const HtmlWebpackPlugin = require("html-webpack-plugin");
let { relativeUrl } = require("./path");
let arr = [
  new HtmlWebpackPlugin({
    title: "list",
    filename: "html/list.html",
    template: relativeUrl("./public/html/list.html"),
    inject: "body",
    chunks: ["list"],
    minify: false,
  }),
  new HtmlWebpackPlugin({
    title: "index",
    filename: "index.html",
    template: relativeUrl("./public/index.html"),
    inject: "body",
    chunks: ["index"],
    minify: false,
  }),
  new HtmlWebpackPlugin({
    title: "login",
    filename: "html/login.html",
    template: relativeUrl("./public/html/login.html"),
    inject: "body",
    chunks: ["login"],
    minify: false,
  }),
];

let entry = {
  index: "./src/index/index.js",
  list: "./src/list/list.js",
  login:'./src/login/login.js'
};

module.exports = {
  html: arr,
  entry,
};
